package system.data;

import java.util.*;

import framework.core.*;
/*
	Author    :Arrow
	CreateTime:2009-06-03 15:09:46
*/
public class ProductMapOldBase extends Table 
{
//public static final String TABLE_NAME = "T_OUT_SUB";
	public static final String TABLE_NAME = "(SELECT tos.*,TPMO.PRODUCT_CODE_MAP from T_OUT_SUB tos,t_product_map_old tpmo,t_out_head toh";
	 

private static final String BACKUP_TABLE_NAME = "T_OUT_SUB_BACKUP";

private static final String BACKUP_SEQ_NAME = "S_OUT_SUB_BACKUP";


public static final String ID = "ID";

public static final String OUT_BILL_ID = "OUT_BILL_ID";

public static final String OUT_BILL_CODE = "OUT_BILL_CODE";

public static final String POSITION_CODE = "POSITION_CODE";

public static final String POSITION_NAME = "POSITION_NAME";

public static final String PRODUCT_ID = "PRODUCT_ID";

public static final String PRODUCT_CODE = "PRODUCT_CODE";

public static final String PRODUCT_NAME = "PRODUCT_NAME";

public static final String PRODUCT_PRICE = "PRODUCT_PRICE";

public static final String PRODUCT_COUNT = "PRODUCT_COUNT";

public static final String PRODUCT_MONEY = "PRODUCT_MONEY";

public static final String BALANCE_MODE = "BALANCE_MODE";

public static final String GET_BILL_CODE = "GET_BILL_CODE";

public static final String GET_CUSTOMER_CODE = "GET_CUSTOMER_CODE";

public static final String GET_CUSTOMER_NAME = "GET_CUSTOMER_NAME";

public static final String GET_CUSTOMER_STAFF_ID = "GET_CUSTOMER_STAFF_ID";

public static final String GET_CUSTOMER_STAFF_CODE = "GET_CUSTOMER_STAFF_CODE";

public static final String GET_CUSTOMER_STAFF_NAME = "GET_CUSTOMER_STAFF_NAME";

public static final String STATUS = "tos.STATUS";

public static final String CREATE_USER_ID = "CREATE_USER_ID";

public static final String CREATE_USER = "CREATE_USER";

public static final String CREATE_TIME = "CREATE_TIME";

public static final String LAST_UPDATE_USER_ID = "LAST_UPDATE_USER_ID";

public static final String LAST_UPDATE_USER = "LAST_UPDATE_USER";

public static final String LAST_UPDATE_TIME = "LAST_UPDATE_TIME";

public static final String IS_SYNC = "IS_SYNC";

public static final String SUB_REMARK = "SUB_REMARK";

public static final String PROVIDER_CODE = "PROVIDER_CODE";

public static final String CAN_BACK_COUNT = "CAN_BACK_COUNT";

public static final String CUSTOMER_BUS_CODE = "CUSTOMER_BUS_CODE";

public static final String ACTUAL_PRICE = "ACTUAL_PRICE";

public static final String PRODUCT_CODE_MAP = "PRODUCT_CODE_MAP";

public static Vector m_fields = null;


private String m_product_code_map;//老库存编码

private String m_id = ""; //ID

private String m_out_bill_id = ""; //出库单ID

private String m_out_bill_code = ""; //出库单编码

private String m_position_code = ""; //货位编码

private String m_position_name = ""; //货位名称

private String m_product_id = ""; //产品ID

private String m_product_code = ""; //产品编码

private String m_product_name = ""; //产品名称

private double m_product_price = Value.NULL_DOUBLE; //产品价格

private double m_product_count = Value.NULL_DOUBLE; //入库数量

private double m_product_money = Value.NULL_DOUBLE; //产品金额

private String m_balance_mode = ""; //结算模式

private String m_get_bill_code = ""; //领料单号

private String m_get_customer_code = ""; //领料单位编码

private String m_get_customer_name = ""; //领料单位

private String m_get_customer_staff_id = ""; //领料人ID

private String m_get_customer_staff_code = ""; //领料人编码

private String m_get_customer_staff_name = ""; //领料人姓名

private String m_status = ""; //是否有效

private String m_create_user_id = ""; //创建用户ID

private String m_create_user = ""; //创建用户

private String m_create_time = ""; //单证创建时间

private String m_last_update_user_id = ""; //最后修改人ID

private String m_last_update_user = ""; //最后修改人

private String m_last_update_time = ""; //最后修改时间

private String m_is_sync = ""; //是否同步

private String m_sub_remark = ""; //备注

private String m_provider_code = ""; //PROVIDER_CODE

private double m_can_back_count = Value.NULL_DOUBLE; //CAN_BACK_COUNT

private String m_customer_bus_code = ""; //CUSTOMER_BUS_CODE

private double m_actual_price = Value.NULL_DOUBLE; //ACTUAL_PRICE




public String getMproductCodeMap() {
	return m_product_code_map;
}
public void setMproductCodeMap(String v) {
	
	if(getMproductCodeMap().equals(v)) return ;
	m_product_code_map = v ;
	markDirty(PRODUCT_CODE_MAP);
	
}

	public String getId()
	{
	    return m_id;
	}
	public void  setId(String v)
	{
		if(getId().equals(v)) return ;
		m_id = v ;
		markDirty(ID);
	}



	

	public String getOutBillId()
	{
	    return m_out_bill_id;
	}
	public void  setOutBillId(String v)
	{
		if(getOutBillId().equals(v)) return ;
		m_out_bill_id = v ;
		markDirty(OUT_BILL_ID);
	}



	

	public String getOutBillCode()
	{
	    return m_out_bill_code;
	}
	public void  setOutBillCode(String v)
	{
		if(getOutBillCode().equals(v)) return ;
		m_out_bill_code = v ;
		markDirty(OUT_BILL_CODE);
	}



	

	public String getPositionCode()
	{
	    return m_position_code;
	}
	public void  setPositionCode(String v)
	{
		if(getPositionCode().equals(v)) return ;
		m_position_code = v ;
		markDirty(POSITION_CODE);
	}



	

	public String getPositionName()
	{
	    return m_position_name;
	}
	public void  setPositionName(String v)
	{
		if(getPositionName().equals(v)) return ;
		m_position_name = v ;
		markDirty(POSITION_NAME);
	}



	

	public String getProductId()
	{
	    return m_product_id;
	}
	public void  setProductId(String v)
	{
		if(getProductId().equals(v)) return ;
		m_product_id = v ;
		markDirty(PRODUCT_ID);
	}



	

	public String getProductCode()
	{
	    return m_product_code;
	}
	public void  setProductCode(String v)
	{
		if(getProductCode().equals(v)) return ;
		m_product_code = v ;
		markDirty(PRODUCT_CODE);
	}



	

	public String getProductName()
	{
	    return m_product_name;
	}
	public void  setProductName(String v)
	{
		if(getProductName().equals(v)) return ;
		m_product_name = v ;
		markDirty(PRODUCT_NAME);
	}



	

	public double getProductPrice()
	{
	    return m_product_price;
	}
	public void  setProductPrice(double v)
	{
		if(getProductPrice()==v) return ;
		m_product_price = v ;
		markDirty(PRODUCT_PRICE);
	}



	

	public double getProductCount()
	{
	    return m_product_count;
	}
	public void  setProductCount(double v)
	{
		if(getProductCount()==v) return ;
		m_product_count = v ;
		markDirty(PRODUCT_COUNT);
	}



	

	public double getProductMoney()
	{
	    return m_product_money;
	}
	public void  setProductMoney(double v)
	{
		if(getProductMoney()==v) return ;
		m_product_money = v ;
		markDirty(PRODUCT_MONEY);
	}



	

	public String getBalanceMode()
	{
	    return m_balance_mode;
	}
	public void  setBalanceMode(String v)
	{
		if(getBalanceMode().equals(v)) return ;
		m_balance_mode = v ;
		markDirty(BALANCE_MODE);
	}



	

	public String getGetBillCode()
	{
	    return m_get_bill_code;
	}
	public void  setGetBillCode(String v)
	{
		if(getGetBillCode().equals(v)) return ;
		m_get_bill_code = v ;
		markDirty(GET_BILL_CODE);
	}



	

	public String getGetCustomerCode()
	{
	    return m_get_customer_code;
	}
	public void  setGetCustomerCode(String v)
	{
		if(getGetCustomerCode().equals(v)) return ;
		m_get_customer_code = v ;
		markDirty(GET_CUSTOMER_CODE);
	}



	

	public String getGetCustomerName()
	{
	    return m_get_customer_name;
	}
	public void  setGetCustomerName(String v)
	{
		if(getGetCustomerName().equals(v)) return ;
		m_get_customer_name = v ;
		markDirty(GET_CUSTOMER_NAME);
	}



	

	public String getGetCustomerStaffId()
	{
	    return m_get_customer_staff_id;
	}
	public void  setGetCustomerStaffId(String v)
	{
		if(getGetCustomerStaffId().equals(v)) return ;
		m_get_customer_staff_id = v ;
		markDirty(GET_CUSTOMER_STAFF_ID);
	}



	

	public String getGetCustomerStaffCode()
	{
	    return m_get_customer_staff_code;
	}
	public void  setGetCustomerStaffCode(String v)
	{
		if(getGetCustomerStaffCode().equals(v)) return ;
		m_get_customer_staff_code = v ;
		markDirty(GET_CUSTOMER_STAFF_CODE);
	}



	

	public String getGetCustomerStaffName()
	{
	    return m_get_customer_staff_name;
	}
	public void  setGetCustomerStaffName(String v)
	{
		if(getGetCustomerStaffName().equals(v)) return ;
		m_get_customer_staff_name = v ;
		markDirty(GET_CUSTOMER_STAFF_NAME);
	}



	

	public String getStatus()
	{
	    return m_status;
	}
	public void  setStatus(String v)
	{
		if(getStatus().equals(v)) return ;
		m_status = v ;
		markDirty(STATUS);
	}



	

	public String getCreateUserId()
	{
	    return m_create_user_id;
	}
	public void  setCreateUserId(String v)
	{
		if(getCreateUserId().equals(v)) return ;
		m_create_user_id = v ;
		markDirty(CREATE_USER_ID);
	}



	

	public String getCreateUser()
	{
	    return m_create_user;
	}
	public void  setCreateUser(String v)
	{
		if(getCreateUser().equals(v)) return ;
		m_create_user = v ;
		markDirty(CREATE_USER);
	}



	

	public String getCreateTime()
	{
	    return m_create_time;
	}
	public void  setCreateTime(String v)
	{
		if(getCreateTime().equals(v)) return ;
		m_create_time = v ;
		markDirty(CREATE_TIME);
	}



	

	public String getLastUpdateUserId()
	{
	    return m_last_update_user_id;
	}
	public void  setLastUpdateUserId(String v)
	{
		if(getLastUpdateUserId().equals(v)) return ;
		m_last_update_user_id = v ;
		markDirty(LAST_UPDATE_USER_ID);
	}



	

	public String getLastUpdateUser()
	{
	    return m_last_update_user;
	}
	public void  setLastUpdateUser(String v)
	{
		if(getLastUpdateUser().equals(v)) return ;
		m_last_update_user = v ;
		markDirty(LAST_UPDATE_USER);
	}



	

	public String getLastUpdateTime()
	{
	    return m_last_update_time;
	}
	public void  setLastUpdateTime(String v)
	{
		if(getLastUpdateTime().equals(v)) return ;
		m_last_update_time = v ;
		markDirty(LAST_UPDATE_TIME);
	}



	

	public String getIsSync()
	{
	    return m_is_sync;
	}
	public void  setIsSync(String v)
	{
		if(getIsSync().equals(v)) return ;
		m_is_sync = v ;
		markDirty(IS_SYNC);
	}



	

	public String getSubRemark()
	{
	    return m_sub_remark;
	}
	public void  setSubRemark(String v)
	{
		if(getSubRemark().equals(v)) return ;
		m_sub_remark = v ;
		markDirty(SUB_REMARK);
	}



	

	public String getProviderCode()
	{
	    return m_provider_code;
	}
	public void  setProviderCode(String v)
	{
		if(getProviderCode().equals(v)) return ;
		m_provider_code = v ;
		markDirty(PROVIDER_CODE);
	}



	

	public double getCanBackCount()
	{
	    return m_can_back_count;
	}
	public void  setCanBackCount(double v)
	{
		if(getCanBackCount()==v) return ;
		m_can_back_count = v ;
		markDirty(CAN_BACK_COUNT);
	}



	

	public String getCustomerBusCode()
	{
	    return m_customer_bus_code;
	}
	public void  setCustomerBusCode(String v)
	{
		if(getCustomerBusCode().equals(v)) return ;
		m_customer_bus_code = v ;
		markDirty(CUSTOMER_BUS_CODE);
	}



	

	public double getActualPrice()
	{
	    return m_actual_price;
	}
	public void  setActualPrice(double v)
	{
		if(getActualPrice()==v) return ;
		m_actual_price = v ;
		markDirty(ACTUAL_PRICE);
	}



	
	public String viewProductCodeMap(DBConnection con) throws Exception
	{
		return Value.view(getMproductCodeMap());
	}


	public String viewId(DBConnection con) throws Exception
	{
		return Value.view(getId());
	}

	public String viewOutBillId(DBConnection con) throws Exception
	{
		return Value.view(getOutBillId());
	}

	public String viewOutBillCode(DBConnection con) throws Exception
	{
		return Value.view(getOutBillCode());
	}

	public String viewPositionCode(DBConnection con) throws Exception
	{
		return Value.view(getPositionCode());
	}

	public String viewPositionName(DBConnection con) throws Exception
	{
		return Value.view(getPositionName());
	}

	public String viewProductId(DBConnection con) throws Exception
	{
		return Value.view(getProductId());
	}

	public String viewProductCode(DBConnection con) throws Exception
	{
		return Value.view(getProductCode());
	}

	public String viewProductName(DBConnection con) throws Exception
	{
		return Value.view(getProductName());
	}

	public String viewProductPrice(DBConnection con) throws Exception
	{
		return Value.view(getProductPrice());
	}

	public String viewProductCount(DBConnection con) throws Exception
	{
		return Value.view(getProductCount());
	}

	public String viewProductMoney(DBConnection con) throws Exception
	{
		return Value.view(getProductMoney());
	}

	public String viewBalanceMode(DBConnection con) throws Exception
	{
		return Value.view(getBalanceMode());
	}

	public String viewGetBillCode(DBConnection con) throws Exception
	{
		return Value.view(getGetBillCode());
	}

	public String viewGetCustomerCode(DBConnection con) throws Exception
	{
		return Value.view(getGetCustomerCode());
	}

	public String viewGetCustomerName(DBConnection con) throws Exception
	{
		return Value.view(getGetCustomerName());
	}

	public String viewGetCustomerStaffId(DBConnection con) throws Exception
	{
		return Value.view(getGetCustomerStaffId());
	}

	public String viewGetCustomerStaffCode(DBConnection con) throws Exception
	{
		return Value.view(getGetCustomerStaffCode());
	}

	public String viewGetCustomerStaffName(DBConnection con) throws Exception
	{
		return Value.view(getGetCustomerStaffName());
	}

	public String viewStatus(DBConnection con) throws Exception
	{
		return Value.view(getStatus());
	}

	public String viewCreateUserId(DBConnection con) throws Exception
	{
		return Value.view(getCreateUserId());
	}

	public String viewCreateUser(DBConnection con) throws Exception
	{
		return Value.view(getCreateUser());
	}

	public String viewCreateTime(DBConnection con) throws Exception
	{
		return Value.view(getCreateTime());
	}

	public String viewLastUpdateUserId(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateUserId());
	}

	public String viewLastUpdateUser(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateUser());
	}

	public String viewLastUpdateTime(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateTime());
	}

	public String viewIsSync(DBConnection con) throws Exception
	{
		return Value.view(getIsSync());
	}

	public String viewSubRemark(DBConnection con) throws Exception
	{
		return Value.view(getSubRemark());
	}

	public String viewProviderCode(DBConnection con) throws Exception
	{
		return Value.view(getProviderCode());
	}

	public String viewCanBackCount(DBConnection con) throws Exception
	{
		return Value.view(getCanBackCount());
	}

	public String viewCustomerBusCode(DBConnection con) throws Exception
	{
		return Value.view(getCustomerBusCode());
	}

	public String viewActualPrice(DBConnection con) throws Exception
	{
		return Value.view(getActualPrice());
	}



protected ProductMapOldBase()
{
}

public void fill(OutSubPageData pageData) throws Exception
{

	if(pageData.getId()!=null)
	{	
		setId(pageData.getId());
	}

	if(pageData.getOutBillId()!=null)
	{	
		setOutBillId(pageData.getOutBillId());
	}

	if(pageData.getOutBillCode()!=null)
	{	
		setOutBillCode(pageData.getOutBillCode());
	}

	if(pageData.getPositionCode()!=null)
	{	
		setPositionCode(pageData.getPositionCode());
	}

	if(pageData.getPositionName()!=null)
	{	
		setPositionName(pageData.getPositionName());
	}

	if(pageData.getProductId()!=null)
	{	
		setProductId(pageData.getProductId());
	}

	if(pageData.getProductCode()!=null)
	{	
		setProductCode(pageData.getProductCode());
	}

	if(pageData.getProductName()!=null)
	{	
		setProductName(pageData.getProductName());
	}

	if( pageData.getProductPrice()!=null && 
	   !pageData.getProductPrice().equals(""))
	{	
		setProductPrice(Double.parseDouble(pageData.getProductPrice()));
	}

	if( pageData.getProductCount()!=null && 
	   !pageData.getProductCount().equals(""))
	{	
		setProductCount(Double.parseDouble(pageData.getProductCount()));
	}

	if( pageData.getProductMoney()!=null && 
	   !pageData.getProductMoney().equals(""))
	{	
		setProductMoney(Double.parseDouble(pageData.getProductMoney()));
	}

	if(pageData.getBalanceMode()!=null)
	{	
		setBalanceMode(pageData.getBalanceMode());
	}

	if(pageData.getGetBillCode()!=null)
	{	
		setGetBillCode(pageData.getGetBillCode());
	}

	if(pageData.getGetCustomerCode()!=null)
	{	
		setGetCustomerCode(pageData.getGetCustomerCode());
	}

	if(pageData.getGetCustomerName()!=null)
	{	
		setGetCustomerName(pageData.getGetCustomerName());
	}

	if(pageData.getGetCustomerStaffId()!=null)
	{	
		setGetCustomerStaffId(pageData.getGetCustomerStaffId());
	}

	if(pageData.getGetCustomerStaffCode()!=null)
	{	
		setGetCustomerStaffCode(pageData.getGetCustomerStaffCode());
	}

	if(pageData.getGetCustomerStaffName()!=null)
	{	
		setGetCustomerStaffName(pageData.getGetCustomerStaffName());
	}

	if(pageData.getStatus()!=null)
	{	
		setStatus(pageData.getStatus());
	}

	if(pageData.getCreateUserId()!=null)
	{	
		setCreateUserId(pageData.getCreateUserId());
	}

	if(pageData.getCreateUser()!=null)
	{	
		setCreateUser(pageData.getCreateUser());
	}

	if(pageData.getCreateTime()!=null)
	{	
		setCreateTime(pageData.getCreateTime());
	}

	if(pageData.getLastUpdateUserId()!=null)
	{	
		setLastUpdateUserId(pageData.getLastUpdateUserId());
	}

	if(pageData.getLastUpdateUser()!=null)
	{	
		setLastUpdateUser(pageData.getLastUpdateUser());
	}

	if(pageData.getLastUpdateTime()!=null)
	{	
		setLastUpdateTime(pageData.getLastUpdateTime());
	}

	if(pageData.getIsSync()!=null)
	{	
		setIsSync(pageData.getIsSync());
	}

	if(pageData.getSubRemark()!=null)
	{	
		setSubRemark(pageData.getSubRemark());
	}

	if(pageData.getProviderCode()!=null)
	{	
		setProviderCode(pageData.getProviderCode());
	}

	if( pageData.getCanBackCount()!=null && 
	   !pageData.getCanBackCount().equals(""))
	{	
		setCanBackCount(Double.parseDouble(pageData.getCanBackCount()));
	}

	if(pageData.getCustomerBusCode()!=null)
	{	
		setCustomerBusCode(pageData.getCustomerBusCode());
	}

	if( pageData.getActualPrice()!=null && 
	   !pageData.getActualPrice().equals(""))
	{	
		setActualPrice(Double.parseDouble(pageData.getActualPrice()));
	}

}

public String getTableName() 
{
	return TABLE_NAME;
}

public String getBackupTableName() 
{
	return BACKUP_TABLE_NAME;
}

public String getBackupSeqName() 
{
	return BACKUP_SEQ_NAME;
}

public java.util.Vector getFields() 
{
	if(m_fields==null)
	{
		m_fields = new Vector();

		m_fields.add(new Field(ID,Value.TYPE_STRING,true,true,32,"ID"));

		m_fields.add(new Field(OUT_BILL_ID,Value.TYPE_STRING,false,true,32,"出库单ID"));

		m_fields.add(new Field(OUT_BILL_CODE,Value.TYPE_STRING,false,true,200,"出库单编码"));

		m_fields.add(new Field(POSITION_CODE,Value.TYPE_STRING,false,true,20,"货位编码"));

		m_fields.add(new Field(POSITION_NAME,Value.TYPE_STRING,false,false,50,"货位名称"));

		m_fields.add(new Field(PRODUCT_ID,Value.TYPE_STRING,false,true,32,"产品ID"));

		m_fields.add(new Field(PRODUCT_CODE,Value.TYPE_STRING,false,true,30,"产品编码"));

		m_fields.add(new Field(PRODUCT_NAME,Value.TYPE_STRING,false,false,50,"产品名称"));

		m_fields.add(new Field(PRODUCT_PRICE,Value.TYPE_DOUBLE,false,true,0,"产品价格"));

		m_fields.add(new Field(PRODUCT_COUNT,Value.TYPE_DOUBLE,false,true,0,"入库数量"));

		m_fields.add(new Field(PRODUCT_MONEY,Value.TYPE_DOUBLE,false,true,0,"产品金额"));

		m_fields.add(new Field(BALANCE_MODE,Value.TYPE_STRING,false,true,20,"结算模式"));

		m_fields.add(new Field(GET_BILL_CODE,Value.TYPE_STRING,false,false,30,"领料单号"));

		m_fields.add(new Field(GET_CUSTOMER_CODE,Value.TYPE_STRING,false,false,30,"领料单位编码"));

		m_fields.add(new Field(GET_CUSTOMER_NAME,Value.TYPE_STRING,false,false,50,"领料单位"));

		m_fields.add(new Field(GET_CUSTOMER_STAFF_ID,Value.TYPE_STRING,false,true,32,"领料人ID"));

		m_fields.add(new Field(GET_CUSTOMER_STAFF_CODE,Value.TYPE_STRING,false,false,20,"领料人编码"));

		m_fields.add(new Field(GET_CUSTOMER_STAFF_NAME,Value.TYPE_STRING,false,false,50,"领料人姓名"));

		m_fields.add(new Field(STATUS,Value.TYPE_STRING,false,true,1,"是否有效"));

		m_fields.add(new Field(CREATE_USER_ID,Value.TYPE_STRING,false,true,32,"创建用户ID"));

		m_fields.add(new Field(CREATE_USER,Value.TYPE_STRING,false,false,50,"创建用户"));

		m_fields.add(new Field(CREATE_TIME,Value.TYPE_STRING,false,false,20,"单证创建时间"));

		m_fields.add(new Field(LAST_UPDATE_USER_ID,Value.TYPE_STRING,false,true,32,"最后修改人ID"));

		m_fields.add(new Field(LAST_UPDATE_USER,Value.TYPE_STRING,false,false,50,"最后修改人"));

		m_fields.add(new Field(LAST_UPDATE_TIME,Value.TYPE_STRING,false,false,20,"最后修改时间"));

		m_fields.add(new Field(IS_SYNC,Value.TYPE_STRING,false,true,1,"是否同步"));

		m_fields.add(new Field(SUB_REMARK,Value.TYPE_STRING,false,false,200,"备注"));

		m_fields.add(new Field(PROVIDER_CODE,Value.TYPE_STRING,false,false,20,"PROVIDER_CODE"));

		m_fields.add(new Field(CAN_BACK_COUNT,Value.TYPE_DOUBLE,false,false,0,"CAN_BACK_COUNT"));

		m_fields.add(new Field(CUSTOMER_BUS_CODE,Value.TYPE_STRING,false,false,30,"CUSTOMER_BUS_CODE"));

		m_fields.add(new Field(ACTUAL_PRICE,Value.TYPE_DOUBLE,false,false,0,"ACTUAL_PRICE"));
		
	}
	return m_fields;
}

public void initObject(java.sql.ResultSet rs) throws Exception
{

	m_id = getString(rs,ID);

	m_out_bill_id = getString(rs,OUT_BILL_ID);

	m_out_bill_code = getString(rs,OUT_BILL_CODE);

	m_position_code = getString(rs,POSITION_CODE);

	m_position_name = getString(rs,POSITION_NAME);

	m_product_id = getString(rs,PRODUCT_ID);

	m_product_code = getString(rs,PRODUCT_CODE);

	m_product_name = getString(rs,PRODUCT_NAME);

	m_product_price = getDouble(rs,PRODUCT_PRICE);

	m_product_count = getDouble(rs,PRODUCT_COUNT);

	m_product_money = getDouble(rs,PRODUCT_MONEY);

	m_balance_mode = getString(rs,BALANCE_MODE);

	m_get_bill_code = getString(rs,GET_BILL_CODE);

	m_get_customer_code = getString(rs,GET_CUSTOMER_CODE);

	m_get_customer_name = getString(rs,GET_CUSTOMER_NAME);

	m_get_customer_staff_id = getString(rs,GET_CUSTOMER_STAFF_ID);

	m_get_customer_staff_code = getString(rs,GET_CUSTOMER_STAFF_CODE);

	m_get_customer_staff_name = getString(rs,GET_CUSTOMER_STAFF_NAME);

	m_status = getString(rs,"STATUS");

	m_create_user_id = getString(rs,CREATE_USER_ID);

	m_create_user = getString(rs,CREATE_USER);

	m_create_time = getString(rs,CREATE_TIME);

	m_last_update_user_id = getString(rs,LAST_UPDATE_USER_ID);

	m_last_update_user = getString(rs,LAST_UPDATE_USER);

	m_last_update_time = getString(rs,LAST_UPDATE_TIME);

	m_is_sync = getString(rs,IS_SYNC);

	m_sub_remark = getString(rs,SUB_REMARK);

	m_provider_code = getString(rs,PROVIDER_CODE);

	m_can_back_count = getDouble(rs,CAN_BACK_COUNT);

	m_customer_bus_code = getString(rs,CUSTOMER_BUS_CODE);

	m_actual_price = getDouble(rs,ACTUAL_PRICE);

	ms_new_flag = ConstDefine.NO;
	
	m_product_code_map = getString(rs,PRODUCT_CODE_MAP);
}

public Value get(String f)
{

	if(f.equalsIgnoreCase(ID))
	{
		return new Value(getId());
	}

	if(f.equalsIgnoreCase(OUT_BILL_ID))
	{
		return new Value(getOutBillId());
	}

	if(f.equalsIgnoreCase(OUT_BILL_CODE))
	{
		return new Value(getOutBillCode());
	}

	if(f.equalsIgnoreCase(POSITION_CODE))
	{
		return new Value(getPositionCode());
	}

	if(f.equalsIgnoreCase(POSITION_NAME))
	{
		return new Value(getPositionName());
	}

	if(f.equalsIgnoreCase(PRODUCT_ID))
	{
		return new Value(getProductId());
	}

	if(f.equalsIgnoreCase(PRODUCT_CODE))
	{
		return new Value(getProductCode());
	}

	if(f.equalsIgnoreCase(PRODUCT_NAME))
	{
		return new Value(getProductName());
	}

	if(f.equalsIgnoreCase(PRODUCT_PRICE))
	{
		return new Value(getProductPrice());
	}

	if(f.equalsIgnoreCase(PRODUCT_COUNT))
	{
		return new Value(getProductCount());
	}

	if(f.equalsIgnoreCase(PRODUCT_MONEY))
	{
		return new Value(getProductMoney());
	}

	if(f.equalsIgnoreCase(BALANCE_MODE))
	{
		return new Value(getBalanceMode());
	}

	if(f.equalsIgnoreCase(GET_BILL_CODE))
	{
		return new Value(getGetBillCode());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_CODE))
	{
		return new Value(getGetCustomerCode());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_NAME))
	{
		return new Value(getGetCustomerName());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_STAFF_ID))
	{
		return new Value(getGetCustomerStaffId());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_STAFF_CODE))
	{
		return new Value(getGetCustomerStaffCode());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_STAFF_NAME))
	{
		return new Value(getGetCustomerStaffName());
	}

	if(f.equalsIgnoreCase(STATUS))
	{
		return new Value(getStatus());
	}

	if(f.equalsIgnoreCase(CREATE_USER_ID))
	{
		return new Value(getCreateUserId());
	}

	if(f.equalsIgnoreCase(CREATE_USER))
	{
		return new Value(getCreateUser());
	}

	if(f.equalsIgnoreCase(CREATE_TIME))
	{
		return new Value(getCreateTime());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER_ID))
	{
		return new Value(getLastUpdateUserId());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER))
	{
		return new Value(getLastUpdateUser());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_TIME))
	{
		return new Value(getLastUpdateTime());
	}

	if(f.equalsIgnoreCase(IS_SYNC))
	{
		return new Value(getIsSync());
	}

	if(f.equalsIgnoreCase(SUB_REMARK))
	{
		return new Value(getSubRemark());
	}

	if(f.equalsIgnoreCase(PROVIDER_CODE))
	{
		return new Value(getProviderCode());
	}

	if(f.equalsIgnoreCase(CAN_BACK_COUNT))
	{
		return new Value(getCanBackCount());
	}

	if(f.equalsIgnoreCase(CUSTOMER_BUS_CODE))
	{
		return new Value(getCustomerBusCode());
	}

	if(f.equalsIgnoreCase(ACTUAL_PRICE))
	{
		return new Value(getActualPrice());
	}
	
	return null;
}
public void set(String f,Value v) throws Exception
{

	if(f.equalsIgnoreCase(ID))
	{
		setId(v.getString());
	}

	if(f.equalsIgnoreCase(OUT_BILL_ID))
	{
		setOutBillId(v.getString());
	}

	if(f.equalsIgnoreCase(OUT_BILL_CODE))
	{
		setOutBillCode(v.getString());
	}

	if(f.equalsIgnoreCase(POSITION_CODE))
	{
		setPositionCode(v.getString());
	}

	if(f.equalsIgnoreCase(POSITION_NAME))
	{
		setPositionName(v.getString());
	}

	if(f.equalsIgnoreCase(PRODUCT_ID))
	{
		setProductId(v.getString());
	}

	if(f.equalsIgnoreCase(PRODUCT_CODE))
	{
		setProductCode(v.getString());
	}

	if(f.equalsIgnoreCase(PRODUCT_NAME))
	{
		setProductName(v.getString());
	}

	if(f.equalsIgnoreCase(PRODUCT_PRICE))
	{
		setProductPrice(v.getDouble());
	}

	if(f.equalsIgnoreCase(PRODUCT_COUNT))
	{
		setProductCount(v.getDouble());
	}

	if(f.equalsIgnoreCase(PRODUCT_MONEY))
	{
		setProductMoney(v.getDouble());
	}

	if(f.equalsIgnoreCase(BALANCE_MODE))
	{
		setBalanceMode(v.getString());
	}

	if(f.equalsIgnoreCase(GET_BILL_CODE))
	{
		setGetBillCode(v.getString());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_CODE))
	{
		setGetCustomerCode(v.getString());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_NAME))
	{
		setGetCustomerName(v.getString());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_STAFF_ID))
	{
		setGetCustomerStaffId(v.getString());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_STAFF_CODE))
	{
		setGetCustomerStaffCode(v.getString());
	}

	if(f.equalsIgnoreCase(GET_CUSTOMER_STAFF_NAME))
	{
		setGetCustomerStaffName(v.getString());
	}

	if(f.equalsIgnoreCase(STATUS))
	{
		setStatus(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_USER_ID))
	{
		setCreateUserId(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_USER))
	{
		setCreateUser(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_TIME))
	{
		setCreateTime(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER_ID))
	{
		setLastUpdateUserId(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER))
	{
		setLastUpdateUser(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_TIME))
	{
		setLastUpdateTime(v.getString());
	}

	if(f.equalsIgnoreCase(IS_SYNC))
	{
		setIsSync(v.getString());
	}

	if(f.equalsIgnoreCase(SUB_REMARK))
	{
		setSubRemark(v.getString());
	}

	if(f.equalsIgnoreCase(PROVIDER_CODE))
	{
		setProviderCode(v.getString());
	}

	if(f.equalsIgnoreCase(CAN_BACK_COUNT))
	{
		setCanBackCount(v.getDouble());
	}

	if(f.equalsIgnoreCase(CUSTOMER_BUS_CODE))
	{
		setCustomerBusCode(v.getString());
	}

	if(f.equalsIgnoreCase(ACTUAL_PRICE))
	{
		setActualPrice(v.getDouble());
	}
	
}
public String toString()
{
	String msg = "OutSub=\n";
	msg += "(\r\n";

	msg += "    ID(id)="+get("id")+"\r\n";

	msg += "    出库单ID(out_bill_id)="+get("out_bill_id")+"\r\n";

	msg += "    出库单编码(out_bill_code)="+get("out_bill_code")+"\r\n";

	msg += "    货位编码(position_code)="+get("position_code")+"\r\n";

	msg += "    货位名称(position_name)="+get("position_name")+"\r\n";

	msg += "    产品ID(product_id)="+get("product_id")+"\r\n";

	msg += "    产品编码(product_code)="+get("product_code")+"\r\n";

	msg += "    产品名称(product_name)="+get("product_name")+"\r\n";

	msg += "    产品价格(product_price)="+get("product_price")+"\r\n";

	msg += "    入库数量(product_count)="+get("product_count")+"\r\n";

	msg += "    产品金额(product_money)="+get("product_money")+"\r\n";

	msg += "    结算模式(balance_mode)="+get("balance_mode")+"\r\n";

	msg += "    领料单号(get_bill_code)="+get("get_bill_code")+"\r\n";

	msg += "    领料单位编码(get_customer_code)="+get("get_customer_code")+"\r\n";

	msg += "    领料单位(get_customer_name)="+get("get_customer_name")+"\r\n";

	msg += "    领料人ID(get_customer_staff_id)="+get("get_customer_staff_id")+"\r\n";

	msg += "    领料人编码(get_customer_staff_code)="+get("get_customer_staff_code")+"\r\n";

	msg += "    领料人姓名(get_customer_staff_name)="+get("get_customer_staff_name")+"\r\n";

	msg += "    是否有效(status)="+get("status")+"\r\n";

	msg += "    创建用户ID(create_user_id)="+get("create_user_id")+"\r\n";

	msg += "    创建用户(create_user)="+get("create_user")+"\r\n";

	msg += "    单证创建时间(create_time)="+get("create_time")+"\r\n";

	msg += "    最后修改人ID(last_update_user_id)="+get("last_update_user_id")+"\r\n";

	msg += "    最后修改人(last_update_user)="+get("last_update_user")+"\r\n";

	msg += "    最后修改时间(last_update_time)="+get("last_update_time")+"\r\n";

	msg += "    是否同步(is_sync)="+get("is_sync")+"\r\n";

	msg += "    备注(sub_remark)="+get("sub_remark")+"\r\n";

	msg += "    PROVIDER_CODE(provider_code)="+get("provider_code")+"\r\n";

	msg += "    CAN_BACK_COUNT(can_back_count)="+get("can_back_count")+"\r\n";

	msg += "    CUSTOMER_BUS_CODE(customer_bus_code)="+get("customer_bus_code")+"\r\n";

	msg += "    ACTUAL_PRICE(actual_price)="+get("actual_price")+"\r\n";
		
	msg += ")\r\n";
	return msg;
}
public void copyBase(ProductMapOldBase srcObj)
{

	setOutBillId(srcObj.getOutBillId());

	setOutBillCode(srcObj.getOutBillCode());

	setPositionCode(srcObj.getPositionCode());

	setPositionName(srcObj.getPositionName());

	setProductId(srcObj.getProductId());

	setProductCode(srcObj.getProductCode());

	setProductName(srcObj.getProductName());

	setProductPrice(srcObj.getProductPrice());

	setProductCount(srcObj.getProductCount());

	setProductMoney(srcObj.getProductMoney());

	setBalanceMode(srcObj.getBalanceMode());

	setGetBillCode(srcObj.getGetBillCode());

	setGetCustomerCode(srcObj.getGetCustomerCode());

	setGetCustomerName(srcObj.getGetCustomerName());

	setGetCustomerStaffId(srcObj.getGetCustomerStaffId());

	setGetCustomerStaffCode(srcObj.getGetCustomerStaffCode());

	setGetCustomerStaffName(srcObj.getGetCustomerStaffName());

	setStatus(srcObj.getStatus());

	setCreateUserId(srcObj.getCreateUserId());

	setCreateUser(srcObj.getCreateUser());

	setCreateTime(srcObj.getCreateTime());

	setLastUpdateUserId(srcObj.getLastUpdateUserId());

	setLastUpdateUser(srcObj.getLastUpdateUser());

	setLastUpdateTime(srcObj.getLastUpdateTime());

	setIsSync(srcObj.getIsSync());

	setSubRemark(srcObj.getSubRemark());

	setProviderCode(srcObj.getProviderCode());

	setCanBackCount(srcObj.getCanBackCount());

	setCustomerBusCode(srcObj.getCustomerBusCode());

	setActualPrice(srcObj.getActualPrice());

}

public String toXml() throws Exception
{
	String xml = "";
	xml += "<OutSub>";

	xml += "<Id>"+Value.view(getId())+"</Id>";

	xml += "<OutBillId>"+Value.view(getOutBillId())+"</OutBillId>";

	xml += "<OutBillCode>"+Value.view(getOutBillCode())+"</OutBillCode>";

	xml += "<PositionCode>"+Value.view(getPositionCode())+"</PositionCode>";

	xml += "<PositionName>"+Value.view(getPositionName())+"</PositionName>";

	xml += "<ProductId>"+Value.view(getProductId())+"</ProductId>";

	xml += "<ProductCode>"+Value.view(getProductCode())+"</ProductCode>";

	xml += "<ProductName>"+Value.view(getProductName())+"</ProductName>";

	xml += "<ProductPrice>"+Value.view(getProductPrice())+"</ProductPrice>";

	xml += "<ProductCount>"+Value.view(getProductCount())+"</ProductCount>";

	xml += "<ProductMoney>"+Value.view(getProductMoney())+"</ProductMoney>";

	xml += "<BalanceMode>"+Value.view(getBalanceMode())+"</BalanceMode>";

	xml += "<GetBillCode>"+Value.view(getGetBillCode())+"</GetBillCode>";

	xml += "<GetCustomerCode>"+Value.view(getGetCustomerCode())+"</GetCustomerCode>";

	xml += "<GetCustomerName>"+Value.view(getGetCustomerName())+"</GetCustomerName>";

	xml += "<GetCustomerStaffId>"+Value.view(getGetCustomerStaffId())+"</GetCustomerStaffId>";

	xml += "<GetCustomerStaffCode>"+Value.view(getGetCustomerStaffCode())+"</GetCustomerStaffCode>";

	xml += "<GetCustomerStaffName>"+Value.view(getGetCustomerStaffName())+"</GetCustomerStaffName>";

	xml += "<Status>"+Value.view(getStatus())+"</Status>";

	xml += "<CreateUserId>"+Value.view(getCreateUserId())+"</CreateUserId>";

	xml += "<CreateUser>"+Value.view(getCreateUser())+"</CreateUser>";

	xml += "<CreateTime>"+Value.view(getCreateTime())+"</CreateTime>";

	xml += "<LastUpdateUserId>"+Value.view(getLastUpdateUserId())+"</LastUpdateUserId>";

	xml += "<LastUpdateUser>"+Value.view(getLastUpdateUser())+"</LastUpdateUser>";

	xml += "<LastUpdateTime>"+Value.view(getLastUpdateTime())+"</LastUpdateTime>";

	xml += "<IsSync>"+Value.view(getIsSync())+"</IsSync>";

	xml += "<SubRemark>"+Value.view(getSubRemark())+"</SubRemark>";

	xml += "<ProviderCode>"+Value.view(getProviderCode())+"</ProviderCode>";

	xml += "<CanBackCount>"+Value.view(getCanBackCount())+"</CanBackCount>";

	xml += "<CustomerBusCode>"+Value.view(getCustomerBusCode())+"</CustomerBusCode>";

	xml += "<ActualPrice>"+Value.view(getActualPrice())+"</ActualPrice>";
	
	xml += "</OutSub>";
	return xml;
}

}
